<include target="./header.html" />
<load target="filter/insert_functional_info.xml" />
<load target="js/forum_admin.js" />
{$setup_content}
<section class="section">
	<h1>{$lang->functional_info}</h1>
	<form id="_form" action="./" method="post" onsubmit="return procFilter(this, insert_functional_info)" enctype="multipart/form-data" class="x_form-horizontal">
		<input type="hidden" name="page" value="{$page}" />
		<input type="hidden" name="mid" value="{$module_info->mid}" />
		<input type="hidden" name="act" value="{Context::get('act')}" />
		<input type="hidden" name="module_srl" value="{$module_info->module_srl}" />
		<input type="hidden" name="use_anonymous" value="{$module_info->use_anonymous}" />
		<input type="hidden" name="allow_anonymous_search" value="{$module_info->allow_anonymous_search}" />
		<input type="hidden" name="consultation" value="{$module_info->consultation}" />
		<input type="hidden" name="title" value="{$module_info->title}" />
		<input type="hidden" name="comment" value="{$module_info->comment}" />
		<input type="hidden" name="admin_mail" value="{$module_info->admin_mail}" />
		<input type="hidden" name="header_text" value="{$module_info->header_text}" />
		<input type="hidden" name="footer_text" value="{$module_info->footer_text}" />
		<div class="x_control-group">
			<label for="order_target" class="x_control-label">{$lang->order_target}</label>
			<div class="x_controls">
				<select name="order_target" id="order_target">
					<option loop="$order_target => $key,$val" value="{$key}" selected="selected"|cond="$module_info->order_target == $key">{$val}</option>
				</select>
			</div>
		</div>
		<div class="x_control-group">
			<label for="order_type" class="x_control-label">{$lang->order_type}</label>
			<div class="x_controls">
				<select name="order_type" id="order_type">
					<option value="asc" selected="selected"|cond="$module_info->order_type != 'desc'">{$lang->order_asc}(ex: 1, 2, 3)</option>
					<option value="desc" selected="selected"|cond="$module_info->order_type == 'desc'">{$lang->order_desc}(ex: 3, 2, 1)</option>
				</select>
			</div>
		</div>
		<div class="x_control-group">
			<label for="list_count" class="x_control-label">{$lang->list_count}</label>
			<div class="x_controls">
				<input type="number" name="list_count" id="list_count" value="{$module_info->list_count?$module_info->list_count:20}" />
				<a href="#about_list_count" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
				<p class="x_help-block" id="about_list_count" hidden>{$lang->about_list_count}</p>
			</div>
		</div>
		<div class="x_control-group">
			<label for="search_list_count" class="x_control-label">{$lang->search_list_count}</label>
			<div class="x_controls">
				<input type="number" name="search_list_count" id="search_list_count" value="{$module_info->search_list_count?$module_info->search_list_count:20}" />
				<a href="#about_search_list_count" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
				<p class="x_help-block" id="about_search_list_count" hidden>{$lang->about_search_list_count}</p>
			</div>
		</div>
		<div class="x_control-group">
			<label for="page_count" class="x_control-label">{$lang->page_count}</label>
			<div class="x_controls">
				<input type="number" name="page_count" id="page_count" value="{$module_info->page_count?$module_info->page_count:10}" />
				<a href="#about_page_count" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
				<p class="x_help-block" id="about_page_count" hidden>{$lang->about_page_count}</p>
			</div>
		</div>
		<div class="x_control-group">
			<label for="except_notice" class="x_control-label">{$lang->except_notice}</label>
			<div class="x_controls">
				<label for="except_notice" class="x_inline">
					<input type="checkbox" name="except_notice" id="except_notice" value="Y" checked="checked"|cond="$module_info->except_notice!='N'" />
					{$lang->about_except_notice}
				</label>
			</div>
		</div>
		<div class="btnArea">
			<input type="submit" value="{$lang->cmd_registration}" class="x_btn x_btn-primary" />
		</div>
	</form>
</section>
<section class="section x_form-horizontal">
	<h1>{$lang->cmd_list_setting}</h1>
	<div class="x_control-group">
		<label for="targetItem" class="x_control-label">{$lang->cmd_list_setting}</label>
		<div class="x_controls">
			<p style="padding:5px 0 0 0">{$lang->about_list_config}</p>
			<div style="display:inline-block">
				<select title="{$lang->list_target_item}" style="margin-bottom:8px" size="{count($extra_vars)}" name="targetItem" id="targetItem" ondblclick="doInsertItem()">
					<option loop="$extra_vars => $key,$val" value="{$key}">{$val->name}</option>
				</select>
				<br>
				<button type="button" onclick="doInsertItem()" class="x_btn">{$lang->cmd_insert}</button>
			</div>
			<div style="display:inline-block">
				<select title="{$lang->list_display_item}" style="margin-bottom:8px" size="{count($extra_vars)}" name="displayItem" id="displayItem" ondblclick="doDeleteItem()">
					<option loop="$list_config => $key,$val" value="{$key}">{$val->name}</option>
				</select>
				<br>
				<span class="x_btn-group">
					<button type="button" onclick="doMoveUpItem()" class="x_btn">{$lang->cmd_move_up}</button>
					<button type="button" onclick="doMoveDownItem()" class="x_btn">{$lang->cmd_move_down}</button>
					<button type="button" onclick="doDeleteItem()" class="x_btn">{$lang->cmd_delete}</button>
				</span>
			</div>
		</div>
	</div>
	<div class="btnArea">
		<button type="button" onclick="doSaveListConfig('{$module_srl}'); return false;" class="x_btn x_btn-primary" style="min-width:120px">{$lang->cmd_save}</button>
	</div>
</section>
